package com.huoyun.cargo.bean;

import java.util.Date;

import com.huoyun.util.DateUtil;

public class CargoInfo {
	
	/**
	 * 货物id
	 */
	private long id;
	
	/**
	 * 货主id
	 */
	private long userId;

	/**
	 * 发票id
	 */
	private long invoiceId;
	
	/**
	 * 保险唯一标示
	 */
	private long insuranceId;
	
	/**
	 * 货物标题
	 */
	private String title;
	
	/**
	 * 货物类型
	 */
	private String type;
	
	/**
	 * 规格（长）
	 */
	private String length;
	
	/**
	 * 规格（宽）
	 */
	private String width;
	
	/**
	 * 规格（高）
	 */
	private String height;
	
	/**
	 * 包装
	 */
	private String packageType;
	
	/**
	 * 计量方式
	 */
	private String measure;
	
	/**
	 * 总体积
	 */
	public String volume;
	
	/**
	 * 总重量
	 */
	public String amount;
	
	/**
	 * 总件数
	 */
	public int number;
	
	/**
	 * 总运费
	 */
	private String freight;
	
	/**
	 * 车辆要求（多个使用,隔开）
	 */
	private String carRequired;
	
	/**
	 * 应标截止时间
	 */
	private Date bidEndTime;
	
	/**
	 * 特别提示
	 */
	private String otherInfo;
	
	/**
	 * 起运地_省
	 */
	private String startProvince;
	
	/**
	 * 起运地_市
	 */
	private String startCity;
	
	/**
	 * 起运地_区
	 */
	private String startTown;
	
	/**
	 * 起运地_详细地址
	 */
	private String startAddress;
	
	/**
	 * 发货人名称
	 */
	private String sender;
	
	/**
	 * 发货人电话
	 */
	private String senderPhone;
	
	/**
	 * 发货密码
	 */
	private String sendPassword;
	
	/**
	 * 装货时间区间（开始时间）
	 */
	private Date loadStartTime;
	
	/**
	 * 装货时间区间（结束时间）
	 */
	private Date loadEndTime;
	
	/**
	 * 目的地_省
	 */
	private String destinationProvince;
	
	/**
	 * 目的地_市
	 */
	private String destinationCity;
	
	/**
	 * 目的地_区
	 */
	private String destinationTown;
	
	/**
	 * 目的地_详细地址
	 */
	private String destinationAddress;
	
	/**
	 * 收货人姓名
	 */
	private String receiver;
	
	/**
	 * 收货人电话
	 */
	private String receiverPhone;
	
	/**
	 * 收货密码
	 */
	private String receivePassword;

	/**
	 * 收货时间区间（开始时间）
	 */
	private Date unloadStartTime;
	
	/**
	 * 收货时间区间（结束时间）
	 */
	private Date unloadEndTime;
	
	/**
	 * 费率
	 */
	private String rate;
	
	/**
	 * 状态：0表示待审核，1表示审核通过，2表示审核未通过'
	 */
	private int status;
	
	/**
	 * 查看该批货物的数量
	 */
	private int viewCount;
	
	/**
	 * 添加时间
	 */
	private Date addTime;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public long getInvoiceId() {
		return invoiceId;
	}

	public void setInvoiceId(long invoiceId) {
		this.invoiceId = invoiceId;
	}

	public long getInsuranceId() {
		return insuranceId;
	}

	public void setInsuranceId(long insuranceId) {
		this.insuranceId = insuranceId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getLength() {
		return length;
	}

	public void setLength(String length) {
		this.length = length;
	}

	public String getWidth() {
		return width;
	}

	public void setWidth(String width) {
		this.width = width;
	}

	public String getHeight() {
		return height;
	}

	public void setHeight(String height) {
		this.height = height;
	}

	public String getPackageType() {
		return packageType;
	}

	public void setPackageType(String packageType) {
		this.packageType = packageType;
	}

	public String getMeasure() {
		return measure;
	}

	public void setMeasure(String measure) {
		this.measure = measure;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getFreight() {
		return freight;
	}

	public void setFreight(String freight) {
		this.freight = freight;
	}

	public String getCarRequired() {
		return carRequired;
	}

	public void setCarRequired(String carRequired) {
		this.carRequired = carRequired;
	}

	public String getOtherInfo() {
		return otherInfo;
	}

	public void setOtherInfo(String otherInfo) {
		this.otherInfo = otherInfo;
	}

	public String getStartProvince() {
		return startProvince;
	}

	public void setStartProvince(String startProvince) {
		this.startProvince = startProvince;
	}

	public String getStartCity() {
		return startCity;
	}

	public void setStartCity(String startCity) {
		this.startCity = startCity;
	}

	public String getStartTown() {
		return startTown;
	}

	public void setStartTown(String startTown) {
		this.startTown = startTown;
	}

	public String getStartAddress() {
		return startAddress;
	}

	public void setStartAddress(String startAddress) {
		this.startAddress = startAddress;
	}

	public String getSender() {
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	public String getSenderPhone() {
		return senderPhone;
	}

	public void setSenderPhone(String senderPhone) {
		this.senderPhone = senderPhone;
	}

	public String getSendPassword() {
		return sendPassword;
	}

	public void setSendPassword(String sendPassword) {
		this.sendPassword = sendPassword;
	}

	public Date getLoadStartTime() {
		return loadStartTime;
	}

	public void setLoadStartTime(Date loadStartTime) {
		this.loadStartTime = loadStartTime;
	}

	public Date getLoadEndTime() {
		return loadEndTime;
	}

	public void setLoadEndTime(Date loadEndTime) {
		this.loadEndTime = loadEndTime;
	}

	public String getDestinationProvince() {
		return destinationProvince;
	}

	public void setDestinationProvince(String destinationProvince) {
		this.destinationProvince = destinationProvince;
	}

	public String getDestinationCity() {
		return destinationCity;
	}

	public void setDestinationCity(String destinationCity) {
		this.destinationCity = destinationCity;
	}

	public String getDestinationTown() {
		return destinationTown;
	}

	public void setDestinationTown(String destinationTown) {
		this.destinationTown = destinationTown;
	}

	public String getDestinationAddress() {
		return destinationAddress;
	}

	public void setDestinationAddress(String destinationAddress) {
		this.destinationAddress = destinationAddress;
	}

	public String getReceiver() {
		return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	public String getReceiverPhone() {
		return receiverPhone;
	}

	public void setReceiverPhone(String receiverPhone) {
		this.receiverPhone = receiverPhone;
	}

	public String getReceivePassword() {
		return receivePassword;
	}

	public void setReceivePassword(String receivePassword) {
		this.receivePassword = receivePassword;
	}

	public Date getUnloadStartTime() {
		return unloadStartTime;
	}

	public void setUnloadStartTime(Date unloadStartTime) {
		this.unloadStartTime = unloadStartTime;
	}

	public Date getUnloadEndTime() {
		return unloadEndTime;
	}

	public void setUnloadEndTime(Date unloadEndTime) {
		this.unloadEndTime = unloadEndTime;
	}

	public String getRate() {
		return rate;
	}

	public void setRate(String rate) {
		this.rate = rate;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Date getAddTime() {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	public Date getBidEndTime() {
		return bidEndTime;
	}

	public void setBidEndTime(Date bidEndTime) {
		this.bidEndTime = bidEndTime;
	}

	public int getViewCount() {
		return viewCount;
	}

	public void setViewCount(int viewCount) {
		this.viewCount = viewCount;
	}

	public String getVolume() {
		return volume;
	}

	public void setVolume(String volume) {
		this.volume = volume;
	}

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	/**
	 * 按不同时段定制日期格式(与当前时间比较)
	 * 小于1小时：mm分钟前
	 * 当天：今天HH:mm
	 * 昨天：昨天HH:mm
	 * 小于一年：MM-dd HH:mm
	 * 大于一年：yyyy-MM-dd HH:mm
	 */
	public String getAddTimeForPeriod() {
		return DateUtil.getDateStrForPeriod(addTime);
	}
}
